package io.renren.utils;

import com.alibaba.druid.util.StringUtils;

/**
 * @author a
 */
public class FieldUtils {

    public static String genGetMethodName(String fieldName){
        if (StringUtils.isEmpty(fieldName) || fieldName.length()<2){
            return fieldName;
        }
        return "get"+fieldName.substring(0,1).toUpperCase()+fieldName.substring(1);
    }

    public static String genSetMethodName(String fieldName){
        if (StringUtils.isEmpty(fieldName) || fieldName.length()<2){
            return fieldName;
        }
        return "set"+fieldName.substring(0,1).toUpperCase()+fieldName.substring(1);
    }
}
